//
//  NetworkAlertVC.m
//  VideoPlayer
//
//  Created by 白璐 on 16/10/8.
//  Copyright © 2016年 baidu. All rights reserved.
//

#import "NetworkAlertVC.h"

@interface NetworkAlertVC ()

@property (weak, nonatomic) IBOutlet UIImageView *background;
@property (weak, nonatomic) IBOutlet UIButton *continueButton;
@property (weak, nonatomic) IBOutlet UIButton *cancelButton;

@end

@implementation NetworkAlertVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    UIImage* image = [UIImage imageNamed:@"popup_background"];
    image = [image resizableImageWithCapInsets:UIEdgeInsetsMake(10, 10, 10, 10) resizingMode:UIImageResizingModeTile];
    self.background.image = image;
    
    image = [UIImage imageNamed:@"button_parameter_background"];
    image = [image resizableImageWithCapInsets:UIEdgeInsetsMake(10, 10, 10, 10) resizingMode:UIImageResizingModeTile];
    [self.continueButton setBackgroundImage:image forState:UIControlStateNormal];
    [self.cancelButton setBackgroundImage:image forState:UIControlStateNormal];
    
}

- (IBAction)onContinue:(id)sender {
    if (self.cancelBlock) {
        self.cancelBlock(NO);
    }
}

- (IBAction)onCancel:(id)sender {
    if (self.cancelBlock) {
        self.cancelBlock(YES);
    }
}

@end
